Skip to content

feat: wire up file sync window#64

Merged
deansheather merged 5 commits into
mainfrom
dean/sync-wiring
Apr 2, 2025
Merged

feat: wire up file sync window#64
deansheather merged 5 commits into
mainfrom
dean/sync-wiring

Conversation

@deansheather

@deansheather deansheather commented Mar 26, 2025

Copy link
Copy Markdown
Member
  • Adds PauseSyncSession and ResumeSyncSession
  • Adds SyncSessionViewModel that wraps SyncSessionModel and adds view methods (as you cannot access the parent context if you're in a ItemsRepeater apparently)
  • Wires up Initialize, List, Pause, Resume, Terminate and Create in the file sync UI

TODO:

  • Prevent the app from loading until mutagen finishes initializing (either successfully or not) (in a different PR)
  • Add reinitialization logic to mutagen controller (in a different PR)

Closes #26
Closes #28
Closes #29

@deansheather deansheather marked this pull request as ready for review March 28, 2025 12:37
Comment thread App/Services/MutagenController.cs Outdated
Comment thread App/Models/SyncSessionModel.cs Outdated
Comment thread App/Models/SyncSessionModel.cs
Comment thread App/Services/MutagenController.cs Outdated
Comment thread App/Models/SyncSessionModel.cs Outdated
Comment thread Tests.App/Services/MutagenControllerTest.cs
Comment thread Tests.App/Services/MutagenControllerTest.cs Outdated
@deansheather deansheather requested a review from spikecurtis April 2, 2025 04:23

@spikecurtis spikecurtis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread App/Services/MutagenController.cs Outdated
Ssh,
}

public class CreateSyncSessionRequestEndpoint

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering out loud: these names are getting really long... is it C# style to namespace them rather than have a long prefix?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the convention is. Another option would be to move these inside the "parent type" e.g. new CreateSyncSessionRequest.Endpoint().

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me since they are only used to fully define the CreateSyncSessionRequest type

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed these to:

  • CreateSyncSessionRequest.Endpoint
  • CreateSyncSessionRequest.Endpoint.ProtocolKind (can't be Protocol or it conflicts with the property with the same name)

So the names are longer when using them, but they're segregated and not cluttering up the main namespace

@deansheather deansheather requested a review from spikecurtis April 2, 2025 06:54
- Use locks during operations for daemon process consistency
- Use a state model for UI rendering
- Use events to signal state changes
- Fix some tooltip problems that arise from polling
@deansheather deansheather merged commit 8f60b4d into main Apr 2, 2025
@deansheather deansheather deleted the dean/sync-wiring branch April 2, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants